package org.rcy.ruicingmarket.oss.role;

import lombok.Data;
import org.rcy.framework.api.entity.BaseEntity;
import org.rcy.framework.api.security.GrantedRole;
import org.rcy.ruicingmarket.oss.user.OssUser;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

/**
 * @author 吴康桥
 * @Description
 * @date 2022/10/9 16:21
 */

@Data
@Table(name = "role")
@Entity
public class Role extends BaseEntity implements GrantedRole {
	private static final long serialVersionUID = 928067015204717004L;
	private String name;
	private String description;
	private String shortName;
	private Date createTime;
	private Date updateTime;
	@Transient
	private List<OssUser> userList;

	@Override
	public String getKey() {
		return shortName;
	}
}
